The present invention relates to an image processing system and, more particularly, to a moving picture encoding/decoding system, moving picture encoding/decoding apparatus, moving picture encoding/decoding method, recording medium on which a moving picture encoding/decoding program is recorded, recording medium on which a moving picture encoding program is recorded, and recording medium on which a moving picture decoding program is recorded.
In recent years, moving picture encoding extensively uses a moving picture encoding means in units of objects. The MPEG (Moving Picture Experts Group)-4, which is being standardized in ISO/IEC, also adopts encoding in units of objects. In this method, an image object (to be simply referred to as an xe2x80x9cobjectxe2x80x9d) serving as a component of an image is encoded together with shape information representing the contour, and these objects are synthesized by a decoder, thereby reconstructing a target encoded image.
To encode an object with an arbitrary shape, a rectangular region including the object is set as a target encoding region, to which a conventional encoding method to a rectangular moving picture is applied.
However, when the target encoding region is encoded using xe2x80x9c0xe2x80x9d as a pixel value outside the object, the pixel prediction residual component on the object boundary increases along with inter-frame prediction to greatly decrease the prediction efficiency and encoding efficiency.
To solve this problem, a method called xe2x80x9cpaddingxe2x80x9d is used. According to this method, the target encoding region is encoded as a rectangular region after a pixel value near the boundary is substituted around the object. In synthesizing the object by the decoder, pixels outside the object are masked using shape information.
FIG. 14 shows the arrangement of a conventional moving picture encoding apparatus used in the ISO/IEC 14496-2 MPEG-4.
Referring to FIG. 14, an input image encoding means 103 encodes a rectangular input image 1000. A first storage means 101 stores a target padding image signal 1001 transferred from the input image encoding means 103. A second storage means 102 stores shape information 1002.
A padding means 100 transfers to the second storage means 102 an address 1005 representing a pixel position in the shape information stored in the second storage means 102, reads out the shape information 1002 stored in the second storage means 102, and identifies a pixel outside the object in the image signal stored in the first storage means 101.
The padding means 100 transfers to the first storage means 101 an address 1007 representing the pixel position outside the object in the image signal, refers to an image signal 1008 stored in the first storage means 101, calculates a pixel value to be substituted into the address 1007, and substitutes the pixel value into the address 1007.
Padding processing in the padding means 100 is realized by executing padding processing for a one-dimensional pixel string twice. FIG. 15 shows a region to be padded within the target encoding region. In a target encoding region 40, an object-including pixel string set 42 outside an object 41 is horizontally padded. Then, a region 43 not included in the pixel string set 42 is vertically padded.
By this processing, the input image encoding means 103 encodes the input image 1000 based on an image signal 1009 filled with proper pixel values outside the object. A shape information encoding means 104 encodes the shape information 1002. Encoded image data 1010 is transferred or stored together with encoded shape information 1003.
The image signal 1001 to be padded includes an input image signal transferred from the input image encoding means 103, and a reference image which is generated inside the input image encoding means 103 and used for inter-frame prediction. When the encoding apparatus pads the reference image used for inter-frame prediction, the decoding apparatus must also pad the reference image.
In identifying the object boundary in padding processing, the conventional moving picture encoding apparatus searches for all the pixels of the target encoding region twice regardless of the object shape. This results in a large arithmetic amount.
For the same reason, the moving picture decoding apparatus for performing padding processing also suffers a large arithmetic amount.
It is an object of the present invention to provide a moving picture encoding/decoding system, moving picture encoding/decoding apparatus, moving picture encoding/decoding method, and recording medium capable of reducing the arithmetic amount and increasing the processing speed.
To achieve the above object, according to the present invention, there is provided a moving picture encoding/decoding system comprising a moving picture encoding apparatus and a moving picture decoding apparatus, the moving picture encoding apparatus having input image encoding means for encoding an input image signal including an image object, first storage means for storing the image signal including the image object to be padded in the input image encoding means, and transferring the image signal to the input image encoding means if necessary, shape information encoding means for encoding shape information representing a shape of the image object to generate encoded shape information, and generating boundary information representing a boundary position of the image object, second storage means for storing the boundary information, and padding means for identifying an outer region of the image object in the image signal stored in the first storage means on the basis of the boundary information stored in the second storage means, calculating a pixel value to be substituted into the outer region, and substituting the pixel value into the region stored in the first storage means, and the moving picture decoding apparatus having image decoding means for referring to a reference image, and decoding encoded image data including an image object to generate an image signal, first storage means for storing the decoded image signal and supplying the decoded image signal as a reference image in next frame decoding processing to the image decoding means, shape information decoding means for decoding encoded shape information serving as encoded data of image object shape information to generate shape information, and generating boundary information representing a boundary position of the image object, second storage means for storing the boundary information, and padding means for identifying an outer region of the image object in the image signal stored in the first storage means on the basis of the boundary information stored in the second storage means, calculating a pixel value to be substituted into the outer region, and substituting the pixel value into the region stored in the first storage means.